home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / biz / dopus / FirstSel.readme < prev    next >
Text File  |  1999-03-02  |  5KB  |  148 lines

  1. Short:    2 Arexx-scripts, result is 1st selected file in dest or source-lister.
  2. Author:   okir@gmx.de (Olaf Kirstein)
  3. Uploader: okir@gmx.de (Olaf Kirstein)
  4. Type:     biz/dopus
  5.  
  6. English and german version (deutscher Text in der unteren Hälfte)
  7.  
  8. These two small ARexx-scripts (FirstSelDest.dopus5 und FirstSelSource.dopus5)
  9. have the full path of the first selected file in dest- or source-lister as the
  10. result. Is no lister present or no file selected, a small errorrequester will
  11. pop up.
  12.  
  13. I wrote these scripts, because with them it is very easy to take action on an
  14. selected file in an other lister, while using the filepopupmenu of a defined
  15. datatype. In the functioneditor, defining:
  16.  
  17. AmigaDos set firstsel `rx DOpus5:ARexx/FirstSelDest.dopus5`
  18.  
  19. you kann refer to this local variable with $firstsel. This method is more
  20. flexible than the DOpus-intern {v}-variant, because before DOpus executes
  21. the function, it checks if the refered var exists. Since it is a local one,
  22. and not present when DOpus checks it, the var would be ignored generating
  23. the batchfile in T:-directory.
  24.  
  25. I defined a datatype for spatch from SAS:
  26.  
  27. Function : AmigaDOS   set spatchold `rx DOpus5:ARexx/FirstSelSource.dopus5 {Qp}`
  28.            AmigaDOS   set spatchout "$spatchold".new
  29.            AmigaDOS   spatch -o$spatchout -p{f} $spatchold
  30.            AmigaDOS   unset spatchold
  31.            AmigaDOS   unset spatchout
  32.  
  33. I select the original file in source-lister, press right mouse over the patchfile
  34. and select the above patch-function in the menu. This generates a new file in
  35. the source-lister. (Spatch is used for updates of shareware or commercial soft-
  36. ware).
  37.  
  38.  
  39. Installation:
  40. -------------
  41.  
  42. Just copy the scripts to DOpus5:ARexx.
  43.  
  44.  
  45. Usage:
  46. ------
  47.  
  48. In the functioneditor of DOpus5 you should give the ARexx-port {Qp} as argument.
  49. Leaving it out, results in trying to use DOPUS.1 as port.
  50. Since the scriptss write the result to StdOut, you can use this output as an
  51. argument for setting local (set) or global (setenv) vars. You also can redirect
  52. the output to a file using ">".
  53.  
  54. AmigaDos set varname `rx scriptname {Qp}` oder
  55. AmigaDos setenv varname `rx scriptname {Qp}`
  56.  
  57. here you should delete the vars after using them with unset or unsetenv.
  58.  
  59. ARexx <scriptname> {Qp} >output
  60.  
  61. redirects the output to a file.
  62.  
  63.  
  64.  
  65. Any suggestions or bugreports please to my email:
  66.  
  67. Olaf Kirstein okir@gmx.de
  68.  
  69.  
  70. ===============================================================================
  71.  
  72. Diese beiden kleinen Arexx-Scripte (FirstSelDest.dopus5 und FirstSelSource.dopus5)
  73. liefern den kompletten Pfad des jeweils ersten angewählten Files im Quell- oder
  74. Ziellister. Ist kein entsprechender Lister vorhanden, oder kein File angewählt,
  75. gibt es einen kleinen Fehlerrequester.
  76.  
  77. Ich habe die Scripte geschrieben, da es hiermit sehr leicht ist, in den
  78. File-Popup-Menüs Aktionen mit angewählten Files aus anderen Listern vorzunehmen.
  79. Definiert man beispielsweise im Funktionseditor folgendes:
  80.  
  81. AmigaDos set firstsel `rx DOpus5:ARexx/FirstSelDest.dopus5`
  82.  
  83. kann man in der Funktion mit $firstsel auf diese lokale Variable zurückgreifen.
  84. Diese Art ist um einiges flexibler, da die DOpus-interne {v}-Variante vor
  85. Ausführung der Funktion prüft, ob eine Variable existiert. Das ist bei lokalen
  86. Variablen natürlich nicht der Fall, und so würde DOpus bei der Generierung des
  87. Batchfiles im T:-Verzeichnis {v} einfach ignorieren.
  88.  
  89. Ich habe hiermit einen Dateityp für spatch von SAS definiert:
  90.  
  91. Funktion : AmigaDOS   set spatchold `rx DOpus5:ARexx/FirstSelSource.dopus5 {Qp}`
  92.            AmigaDOS   set spatchout "$spatchold".new
  93.            AmigaDOS   spatch -o$spatchout -p{f} $spatchold
  94.            AmigaDOS   unset spatchold
  95.            AmigaDOS   unset spatchout
  96.  
  97. Dann wähle ich im Quelllister einfach das Originalfile an, drücke über dem
  98. entsprechendem Patchfile die rechte Maustaste und wähle in dem Menü die obige
  99. Patchfunktion. Es wird dann ein neues File im Quelllister erzeugt. (Spatch
  100. wird bei vielen Updates von Shareware oder kommerzieller Software verwendet).
  101.  
  102.  
  103. Installation:
  104. -------------
  105.  
  106. Einfach die Scripte nach DOpus5:ARexx kopieren.
  107.  
  108.  
  109. Benutzung:
  110. ----------
  111.  
  112. Im Funktionseditor von DOpus5 sollte man als Argument den ARexx-Port {Qp}
  113. angeben. Wird dasArgument weggelassen, wird versucht DOPUS.1 als Port zu
  114. verwenden.
  115. Da die Scripte das Ergebnis nach StdOut liefern, kann man diese direkt als
  116. Argument für das Setzen von lokalen (set) oder globalen (setenv) Variablen
  117. verwenden. Man kann das Ergebnis auch mittels ">" in eine Datei umleiten:
  118.  
  119. AmigaDos set varname `rx scriptname {Qp}` oder
  120. AmigaDos setenv varname `rx scriptname {Qp}`
  121.  
  122. hier sollte man möglichst mit unset bzw. unsetenv die Variablen nach Verwendung
  123. wieder löschen.
  124.  
  125. ARexx <scriptname> {Qp} >ausgabe
  126.  
  127. leitet die Ausgabe in eine Datei um.
  128.  
  129.  
  130.  
  131. Verbesserungsvorschläge und Fehlermeldungen bitte per EMail an:
  132.  
  133. Olaf Kirstein okir@gmx.de
  134.  
  135.  
  136. ============================= Archive contents =============================
  137.  
  138. Original  Packed Ratio    Date     Time    Name
  139. -------- ------- ----- --------- --------  -------------
  140.     1205     531 55.9% 31-Jan-99 21:34:34 +FirstSelDest.dopus5
  141.     1252     544 56.5% 31-Jan-99 21:34:46 +FirstSelSource.dopus5
  142.     2582    1227 52.4% 31-Jan-99 22:51:22 +Liesmich.txt
  143.     1188     523 55.9% 31-Jan-99 21:26:50 +FirstSelDest.dopus5
  144.     1229     528 57.0% 31-Jan-99 21:29:32 +FirstSelSource.dopus5
  145.     2300    1043 54.6% 31-Jan-99 23:05:28 +Readme.txt
  146. -------- ------- ----- --------- --------
  147.     9756    4396 54.9% 01-Feb-99 21:43:52   6 files
  148.